home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc19 / gemfsc19.lzh / GNUGEM27 / AESFSEL.C < prev    next >
C/C++ Source or Header  |  1993-03-24  |  1KB  |  62 lines

  1. /*
  2.  *    Aes file selector library interface
  3.  *
  4.  *        fsel_input    Display and do file selector dialog.
  5.  *        fsel_exinput display and do file sel dialog, also show prompt
  6.  *
  7.  *        ++jrb    bammi@cadence.com
  8.  *        modified: mj -- ntomczak@vm.ucs.ualberta.ca
  9.  */
  10. #include "common.h"
  11.  
  12. #ifdef __DEF_ALL__
  13.  
  14. #define L_fsel_inp
  15. #define L_fsel_exi
  16.  
  17. #endif /* __DEF_ALL__ */
  18.  
  19.  
  20. #ifdef L_fsel_inp
  21.  
  22. /* get file selection
  23.  *    ExitButton 0 = Cancel, 1 = OK
  24.  *    return ==0 on error >0 no error
  25.  */
  26. int fsel_input(char *Path, char *File, int *ExitButton)
  27. {
  28.     int retval;
  29.  
  30.     _addrin[0] = Path;    /* Initial Path */
  31.     _addrin[1] = File;    /* Initial File */
  32.  
  33.     retval = __aes__(AES_CONTROL_ENCODE(90, 0, 2, 2));
  34.  
  35.     *ExitButton = _int_out[1];
  36.     return retval;
  37. }
  38. #endif /* L_fsel_inp */
  39.  
  40. #ifdef L_fsel_exi
  41.  
  42. /* get file selection extended
  43.  *    ExitButton 0 = Cancel, 1 = OK
  44.  *    return ==0 on error >0 no error
  45.  */
  46. int fsel_exinput(char *Path, char *File, int *ExitButton, char *Prompt)
  47. {
  48.     int retval;
  49.  
  50.     _addrin[0] = Path;    /* Initial Path */
  51.     _addrin[1] = File;    /* Initial File */
  52.     _addrin[2] = Prompt; /* prompt to display */
  53.  
  54.     retval = __aes__(AES_CONTROL_ENCODE(91, 0, 2, 3));
  55.  
  56.     *ExitButton = _int_out[1];
  57.     return retval;
  58. }
  59. #endif /* L_fsel_exi */
  60.  
  61. /* - eof - */
  62.